<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>超市订单管理系统</title>
    <link rel="stylesheet" type="text/css" href="/css/style.css">
    <!--[if lt IE 9]>
    <script src="/js/html5.js"></script>
    <![endif]-->
    <script src="/js/jquery.js"></script>
    <script src="/js/jquery.mCustomScrollbar.concat.min.js"></script>
</head>
<body>
<div th:replace="head::header"></div>
<div class="rt_content">
    <div class="page_title">
        <h2 class="fl">功能列表</h2>
        <a href="/perm_add" class="fr top_rt_btn add_icon">添加功能</a>
    </div>
</form>

    <table class="table">
        <tr>
            <th >ID</th>
            <th >功能名称</th>
            <th >操作</th>
        </tr>
        <tr th:each="p:${perms}">
            <td>
                <span th:text="${p.id }"></span>
            </td>
            <td>
                <a><span th:text="${p.name}"></span></a>
            </td>
            <td class="center">
                <a th:href="@{/user/find_permbyid(id=${p.id})}"  title="编辑" class="link_icon" data-toggle="modal"
                   data-target="#updateModal">&#101;</a>
                <a th:href="@{/user/del_perm(id=${p.id})}" onclick="return confirm('您确定要删除吗？');" title="删除" class="link_icon">&#100;</a>
            </td>
        </tr>

    </table>


    <!-- 显示分页信息 -->
    <div class="row">
        <!--分页文字信息  -->
        <div class="col-md-6" id="page_info_area">
            当前<span th:text="${pageInfo.pageNum}"></span>页，
            总<span th:text="${pageInfo.pages}"></span>页，
            总<span th:text="${pageInfo.total}"></span>条记录
        </div>
        <!-- 分页条信息 -->
        <aside class="paging">

            <a th:href="@{/user/find_all_perm(pn=${pageInfo.getFirstPage()})}">首页</a>
            <a th:href="@{/user/find_all_perm(pn=${pageInfo.getPrePage()})}">&laquo;</a>
            <span th:each="p : ${pageInfo.navigatepageNums}"  >
                    <a th:text="${p}" th:href="@{/user/find_all_perm(pn=${p})}" > </a>
                </span>
            <a th:href="@{/user/find_all_perm(pn=${pageInfo.getLastPage()})}">末页</a>

        </aside>
    </div>





</div>
</section>
</body>
</html>